package com.kgc.storeprovider.dao;

import com.kgc.store.pojo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface StoreGoodSummaryMapper {
    List<StoreGoodSummary> selectSummaryByStoreGood(Map<String, Object> map);

    List<KcStore> selectAll();

    List<GoodsTransactionDetail> selectSummaryByGoodsTransactionDetail(Map<String, Object> map);

    List<BatchTrackingDetail> selectSummaryByBatchTrackingDetail(Map<String, Object> map);

    // 更新库存
    int updateStore(@Param("gid") int gid, @Param("sid") int sid, @Param("stock") int stock, @Param("sumCost") BigDecimal sumCost);


    //根据sid（仓库id）和gid（商品id）查询
    KcStoreGood selectKcStoreGoodBySidCid(@Param("sid") int sid, @Param("gid") int gid);

    //新增kc_store_good信息
    int insertKcStoreGood(KcStoreGood kcStoreGood);

    Map<String,Object> getTotalInventoryCost();
}
